package com.project.study.farming.base.controller;

import com.project.study.farming.base.service.DrawService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 画图控制器
 */
@RestController
@RequestMapping("draw")
public class DrawController {

    @Autowired
    private DrawService drawService;

    @GetMapping("pic")
    private Map<String, Object> drawPic(@RequestParam("id") Integer id){
        return this.drawService.drawPic(id);
    }

    @GetMapping("line")
    private Map<String, Object> drawLine(@RequestParam("id") Integer id){
        return this.drawService.drawLine(id);
    }
}
